<template>
  <!-- 3 -->
  <div class="container" v-if="modelData.show">
    <div class="user-info">
      <div class="head">
        <h1>{{ modelData.name }}</h1>
        <p>{{ modelData.abstract }}</p>
      </div>

      <div class="detail">
        <ul>
          <li class="li-border">{{ modelData.age }}岁</li>
          <li class="li-border">{{ modelData.address }}年经验</li>
          <li class="li-border">{{ modelData.phoneNumber }}</li>
          <li class="li-border">{{ modelData.email }}</li>
        </ul>
      </div>
    </div>
    <div class="avatar">
      <el-image style="width: 111px; height: 142px" :src="modelData.avatar" />
    </div>
  </div>
</template>
<script setup lang="ts">
import type { IBASEINFO } from '@/interface/model'
import type { IMODELSTYLE } from '@/interface/modelStyle'
const props = defineProps<{
  modelData: IBASEINFO // 模块数据
  modelStyle: IMODELSTYLE // 模块样式
}>()
</script>
<style lang="scss" scoped>
.container {
  background: url(../../../assets/images/template3_bg_2.png);
  background-repeat: no-repeat;
  width: 100%;
  height: 250px;
  border-bottom: 1px dashed #cfcfcf;
  box-sizing: border-box;
  padding: 40px 50px;
  padding-left: 30px;
  display: flex;
  justify-content: space-between;
  margin-bottom: v-bind('modelStyle.mBottom');
  margin-top: v-bind('modelStyle.mTop');
  padding-top: v-bind('modelStyle.pTop');
  padding-bottom: v-bind('modelStyle.pBottom');
  padding-left: v-bind('modelStyle.pLeftRight');
  padding-right: v-bind('modelStyle.pLeftRight');
  .user-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;

    .head {
      display: flex;
      justify-content: center;
      flex-direction: column;

      h1 {
        font-size: v-bind('modelStyle.titleFontSize');
        color: v-bind('modelStyle.titleColor');
        font-weight: v-bind('modelStyle.titleFontWeight');
        margin-bottom: 10px;
      }

      p {
        font-size: v-bind('modelStyle.textFontSize');
        color: v-bind('modelStyle.titleColor');
        font-weight: v-bind('modelStyle.titleFontWeight');
      }
    }

    .detail {
      ul {
        display: flex;

        li {
          list-style: none;
          font-size: v-bind('modelStyle.textFontSize');
          font-weight: v-bind('modelStyle.textFontWeight');
          padding-right: 24px;
          height: 18px;
          margin-right: 10px;
          display: flex;
          align-items: center;
          justify-content: center;
          color: v-bind('modelStyle.textColor');
        }

        .li-border {
          border-right: 2px solid #b4b4b4;
        }
      }
    }
  }
  .avatar {
    width: 116px;
    height: 146px;
    border: 3px solid #eee;
  }
}
</style>
